package com.express.controller.user;


import com.express.dto.OrderOverviewDto;
import com.express.result.Result;
import com.express.service.IOrdersService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;


@Slf4j
@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private IOrdersService ordersService;

    @GetMapping("/overview")
    @ApiOperation("获取订单概览")
    public Result getOrderOverview() {
        OrderOverviewDto orderOverview= ordersService.getOrderOverview();
        log.info("获取订单概览:{}",orderOverview);
        return Result.success(orderOverview);
    }

}
